import request from '@/utils/request'

// 获取供应商分类分类信息
export function GetList(data) {
    return request({
        url: `/api/BaseData/supplierClassification/`,
        method: 'GET',
        data
    })
}

// 获取供应商分类详细信息
export function GetInfoFy(id) {
    return request({
        url: `/api/BaseData/supplierClassification/${id}`,
        method: 'GET'
    })
}

// 添加供应商分类信息
export function CreateSupplierClassification(data) {
    return request({
        url: '/api/BaseData/supplierClassification',
        method: 'POST',
        data
    })
}

// 更新供应商分类信息
export function updateSupplierClassification(data) {
    return request({
        url: `/api/BaseData/supplierClassification/${data.id}`,
        method: 'PUT',
        data
    })
}

// 批量删除供应商分类信息
export function delupdateSupplierClassificationBatch(data) {
    return request({
        url: `/api/BaseData/supplierClassification/BatchRemove`,
        method: 'POST',
        data
    })
}
// 删除供应商分类信息
export function deleteSupplierClassification(id) {
    return request({
        url: `/api/BaseData/supplierClassification/${id}`,
        method: 'DELETE'
    })
}

// 导出供应商分类信息
export function exportDataApi(data) {
    return request({
        url: `/api/BaseData/supplierClassification/Actions/Export`,
        method: 'GET',
        data
    })
}

// 导入供应商分类信息
export function ImportData(data) {
    return request({
      url: '/api/BaseData/supplierClassification/ImportData',
      method: 'post',
      data
    })
  }
  // 导入预览
  export function ImportPreview(data) {
    return request({
      url: '/api/BaseData/supplierClassification/ImportPreview',
      method: 'get',
      data
    })
  }
  // 模板下载
  export function TemplateDownload() {
    return request({
      url: '/api/BaseData/supplierClassification/TemplateDownload',
      method: 'get'
    })
  }
